package com.dm.testkotal

import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*;
import org.jetbrains.anko.onClick
import org.jetbrains.anko.toast

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        change.onClick {
            hello?.text=""+Math.random()*100

        }
        start.onClick {
            toast("hello")
            val intent = Intent(this, ListActivity::class.java)
            startActivity(intent)
        }
    }
}
